<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>变量的定义</title>
<script type="text/javascript" language="javascript">
	document.write("<h1>淘宝相机竞拍</h1>");
	var price=1000;
	
	var addPrice=prompt("相机竞拍，请出一口价:","1");
	
	var total=parseFloat(price)+parseFloat(addPrice);
	document.write("<h2>你购买相机的价格："+total+"</h2>");
	//NaN:not a number
	//参数如果非0，或非空就返回true 否则返回false	
	
</script>
</head>

<body>
</body>
</html>
